﻿using B.MES.Customer.Domain;
using B.MES.Customer.Domain.DTO;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace B.MES.Customer.Infrastructure.IRepository
{
    /// <summary>
    /// 出库仓储层
    /// </summary>
    public interface IOutboundRepository:IBaseRepository<OutWarehouse>
    {
        /// <summary>
        /// 显示、分页、查询出库列表
        /// </summary>
        /// <param name="pageSize">每页显示条数</param>
        /// <param name="pageIndex">当前页码</param>
        /// <param name="outTopic">出库主题</param>
        /// <returns> 显示、分页、查询出库列表</returns>
        PageApiResut<OutWareHouseDto>  GetOutWare(int pageSize, int pageIndex,string? outTopic);
        /// <summary>
        /// 查看出库详情
        /// </summary>
        /// <param name="outId">出库编号</param>
        /// <returns>出库详情</returns>
        APIResult<OutWareHouseDto> GetOutDetail(int outId);
        /// <summary>
        /// 添加出库信息并更改生产单状态
        /// </summary>
        /// <param name="outTab">出库表</param>
        /// <param name="proCode"> 生产单编号</param>
        /// <returns> 受影响行数</returns>
        int AddOutTab(OutTabDto outTab, string proCode);
        /// <summary>
        /// 获取仓库树形图
        /// </summary>
        /// <param name="pid">父级ID</param>
        /// <returns>仓库树形图</returns>
        List<WareHouseDto> GetWarehousesList(int pid);
        /// <summary>
        /// 编辑出库信息
        /// </summary>
        /// <param name="outId">出库表主键</param>
        /// <returns>返回出库实体</returns>
        OutTab GetOutTabById(int outId);
        /// <summary>
        /// 修改出库信息
        /// </summary>
        /// <param name="outTab">要添加的 出库信息对象</param>
        /// <returns> 受影响行数</returns>
        int UpdOutInfoById(OutTab outTab);
        /// <summary>
        /// 删除出库信息
        /// </summary>
        /// <param name="outId">出库主键</param>
        /// <returns>受影响行数</returns>
        int DelOutById(int outId);
        /// <summary>
        /// 导出出库信息
        /// </summary>
        /// <returns> 显示、分页、查询出库列表</returns>
        List<OutWareHouseDto> GetOutWareExport();
        PageApiResut<Produce> GetProduceShow(string ProCode, int pageIndex, int pageSize);
    }
}
